package tij4.concurrent.exercise.ex06;

import java.util.Random;
import java.util.concurrent.TimeUnit;

public class Practice03 extends Thread {

    @Override
    public void run() {
        try {
            int num = new Random().nextInt(10);
            TimeUnit.MILLISECONDS.sleep(num);
            System.out.println(Thread.currentThread().getName()+"休眠的秒数是："+num);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
